﻿using System.Windows;

namespace Shoozla
{
    public static class TreeViewItemProps
    {
        public static bool GetIsRootLevel(DependencyObject obj)
        {
            return (bool)obj.GetValue(IsRootLevelProperty);
        }

        public static void SetIsRootLevel(DependencyObject obj, bool value)
        {
            obj.SetValue(IsRootLevelProperty, value);
        }

        public static bool GetIsSelectedy(DependencyObject obj)
        {
            return (bool)obj.GetValue(IsSelectedProperty);
        }

        public static void SetIsChecked(DependencyObject obj, bool value)
        {
            obj.SetValue(IsSelectedProperty, value);
        }

        public static readonly DependencyProperty IsRootLevelProperty =
            DependencyProperty.RegisterAttached(
            "IsRootLevel",
            typeof(bool),
            typeof(TreeViewItemProps),
            new UIPropertyMetadata(false));

        public static readonly DependencyProperty IsSelectedProperty =
           DependencyProperty.RegisterAttached(
           "IsSelected",
           typeof(bool),
           typeof(TreeViewItemProps),
           new UIPropertyMetadata(false));
    }

}